<template>
    <div class="nav-wrap">
        <header>
            <img src="../static/img/home.svg" @click="toHome" alt="">
            <span>مارس كىنوخانىسى</span>
            <img src="../static/img/back.svg" @click="navigateBack" alt="">
        </header>
    </div>
</template>
<script>
export default {
    name: "Navbar",
    components: {},
    data() {
        return {};
    },
    methods: {
        navigateBack() {
            this.$router.back();
            this.$router.routerQueue.pop()
        },
        toHome() {
            if (!(this.$route.name == "Home")) {
                this.$router.push({ name: "Home" });
            }
        }
    }
};
</script>
<style lang="scss">
$bgDarkColor: #112233;
.nav-wrap {
    width: 100vw;
    height: 80px;
    header {
        height: 100%;
        width: 100%;
        background-color: $bgDarkColor;
        direction: rtl;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        img {
            &:first-of-type {
                padding-right: 15px;
            }
            &:last-of-type {
                padding-left: 15px;
            }
            width: 50px;
            height: 50px;
        }
        span {
            font-size: 26px;
        }
    }
}
/* .fenlei {
    direction: rtl;
    width: 96%;
    margin: 0 auto;
    // margin-top: 10px;
    display: grid;
    grid-template-columns: auto auto auto;
    text-align: center;
    .txt {
        color: white;
        display: inline-block;
        font-size: 13px;
        border-radius: 25px;
        height: 20px;
        line-height: 25px;
        padding: 5px 5px;
        margin: 5px 10px;
    }
} */
</style>
